<?php
/**
 * Created by MY_MIND.
 * User: WDJ
 * Date: 2018/7/26 0026
 * Time: 11:30
 */
namespace app\api\controller;

use think\Controller;

class Payment extends Controller
{
    /**
     * 获取游戏玩家的资产信息
     */
    public function number()
    {
        $uid    =   intval($this->request->get('uid'));
        $result =   getSqlConnec('QPTreasureDB_CHUI', 'GameScoreInfo')->where(['UserID' => $uid])->find();
        if(empty($result)){
            return json(['code' => 600, 'message' => '获取失败', 'gold' => '', 'card' => '']);
        }
        return json(['code' => 0, 'message' => '获取成功', 'gold' => $result['Score'], 'card' => $result['InsureScore']]);
    }

}